#!/usr/bin/env python
# -*- coding:utf-8 -*-

from flask_restful import Api

from . import message_blueprint
from api.messageResource.messageResource import MessageResource
from api.messageResource.messageOtherResource import MessageOtherResource

api = Api(message_blueprint)

api.add_resource(MessageResource, '/message/<message_id>', '/message', endpoint='Message')


@message_blueprint.route('/message/update/<message_id>', methods=['PUT'], endpoint='MessageUpdate')
def update(message_id):
    return MessageOtherResource.sensitive_update(message_id)
